/*
@title: Arcade runner
@description: Arcade Runner is an endless runner game by Artem4852 where players collect arcade tickets while avoiding bugs and bans. The objective is to gather as many tickets as possible without getting banned or collecting too many bugs, which causes malfunctions. The game challenges players to achieve high scores through strategic movement on the game board.
@author: Artem4852
@tags: ['endless']
@addedOn: 2024-08-04
First time? Check out the tutorial game:
https://sprig.hackclub.com/gallery/getting_started


Controls:
W - up
S - down
Everything else on screen :p
*/

const collectedTicket = tune`
139.53488372093022: F4-139.53488372093022,
139.53488372093022: F4-139.53488372093022,
4186.0465116279065`;
const collectedBug = tune`
96.46302250803859,
96.46302250803859: G5^96.46302250803859,
96.46302250803859: G5^96.46302250803859,
2797.427652733119`;
const lost = tune`
205.4794520547945: C5-205.4794520547945 + D5-205.4794520547945,
205.4794520547945: B4-205.4794520547945 + A4-205.4794520547945,
205.4794520547945: E4-205.4794520547945 + F4-205.4794520547945,
5958.904109589041`;

const player = "p";
const ticket = "t";
const ticketUI = "T";
const ban = "b";
const bug = "B";
const bugUI = "G";

const sky = "s";
const sky2 = "S";
const sky3 = "c";
const sky4 = "C";
const skyCovered = "~"
const skyCovered2 = "_"
const skyCovered3 = "?"
const skyCovered4 = "|"

const road0 = "a";
const road1 = "A";
const road2 = "D";
const road3 = "d";
const road4 = "e";
const road5 = "f";
const road6 = "g";
const road7 = "h";
const road8 = "i";
const road9 = "j";
const road10 = "k";
const road11 = "l";
const road12 = "m";
const road13 = "n";
const road14 = "o";
const road15 = "q";

const bottomMenu0 = "!";
const bottomMenu1 = "@";
const bottomMenu2 = "#";
const bottomMenu3 = "$";
const bottomMenu4 = "%";
const bottomMenu5 = "^";
const bottomMenu6 = "&";
const bottomMenu7 = "*";
const bottomMenu8 = "(";
const bottomMenu9 = ")";
const bottomMenu10 = "-";
const bottomMenu11 = "+";
const bottomMenu12 = "[";
const bottomMenu13 = "]";
const bottomMenu14 = "'";
const bottomMenu15 = "/";

const plainGrey = "<";
const plainGreyDark = ">";
const quarterGrey = "Q";
const halfGrey = "1";
const greyHalf = "2";
const darkGreyHalf = "3";
const halfDarkGrey = "4";
const cornerTLGrey = "5";
const cornerTRGrey = "6";
const cornerBLGrey = "7";
const cornerBRGrey = "8";

const title0 = "E";
const title1 = "F";
const title2 = "H";
const title3 = "I";
const title4 = "J";
const title5 = "K";

const startMenu0 = "L";
const startMenu1 = "M";
const startMenu2 = "N";
const startMenu3 = "O";
const startMenu4 = "P";
const startMenu5 = "R";
const startMenu6 = "U";
const startMenu7 = "V";
const startMenu8 = "W";
const startMenu9 = "X";
const startMenu10 = "Y";
const startMenu11 = "Z";
const startMenu12 = "r";
const startMenu13 = "u";
const startMenu14 = "v";
const startMenu15 = "w";
const startMenu16 = "x";
const startMenu17 = "y";
const startMenu18 = "z";
const startMenu19 = "0";
const startMenu20 = "9";
const startMenu21 = "÷";
const startMenu22 = ",";
const startMenu23 = "±";
const startMenu24 = ":";
const startMenu25 = ";";
const startMenu26 = "=";
const startMenu27 = "℆";
const startMenu28 = "{";
const startMenu29 = "}";
const startMenu30 = "©";
const startMenu31 = "®";
const startMenu32 = "℗";
const startMenu33 = "™";
const startMenu34 = "℠";
const startMenu35 = "№";
const startMenu36 = "ª";
const startMenu37 = "º";
const startMenu38 = "℔";
const startMenu39 = "℥";

setLegend(
  [ player, bitmap`
................
................
...666666.......
..666666666...9.
.66666699999.99.
.6666999999999F.
.669999999999FF.
.999999999999FF.
.999999999999FF.
.999999999999FF.
.9999999999999F.
.99999999999.99.
..999999999...9.
...999999.......
................
................` ],
  [ ticket, bitmap`
................
................
................
..8888....8888..
.88888333333333.
.88833322333333.
.88333232333333.
.83332332333333.
.33333332333333.
.33333332333333.
.333333323333CC.
.33333333333CCC.
..CCCC....CCCC..
................
................
................`], 
  [ ticketUI, bitmap`
................
................
................
................
................
................
..8888....8888..
.88888333333333.
.88833322333333.
.88333232333333.
.83332332333333.
.33333332333333.
.33333332333333.
.333333323333CC.
.33333333333CCC.
..CCCC....CCCC..`], 
  [ ban, bitmap`
................
................
.....888888.....
...8833333333...
...8322223333...
..833233323333..
..333233323333..
..333222233333..
..333233323333..
..333233323333..
..3332222333FF..
...33333333FF...
...3333333FFF...
.....FFFFFF.....
................
................`],
  [ bug, bitmap`
................
................
................
.......222222...
.00....22222....
..003322222233..
...033333333333.
..0033333333333.
.00093332222333.
...999922222333.
....9922222999..
......00.00.00..
.....00.00.00...
................
................
................`],
  [ bugUI, bitmap`
................
................
................
................
................
................
.......222222...
.00....22222....
..003322222233..
...033333333333.
..0033333333333.
.00093332222333.
...999922222333.
....9922222999..
......00.00.00..
.....00.00.00...`],
  
  [ sky, bitmap`
7777777777777777
7777777777777777
2222222277777777
2222222227777777
2222222222227777
2222222222222277
2222222222222277
2222222222222277
2222222222227777
2222222222777777
2222222227777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ sky2, bitmap`
7777777777777777
7777777777777777
7777777777777772
7777777777777722
7222222277772222
7222222222222222
7222222222222222
7222222222222222
7772222222222222
7777777222222222
7777777722222222
7777777777777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ sky3, bitmap`
7777777777777777
7777777777227777
7777777722222277
7777777222222277
7777777777777777
7777777777777777
2227777777777777
2222222227777777
2222222227777777
2222222222777777
2222222227777777
2222222277777777
2222777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ sky4, bitmap`
7777777777777777
7777777777777777
7722222277777777
7222222222777777
7722222222777777
7722222222777777
7772222277777722
7777777777777222
7777777722222222
7777777222222222
7777777222222222
7777777772222222
7777777777772222
7777777777777777
7777777777777777
7777777777777777`],
  [ skyCovered, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
2222222222227777
2222222222222277
2222222222222277
2222222222222277
2222222222227777
2222222222777777
2222222227777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ skyCovered2, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
7222222277772222
7222222222222222
7222222222222222
7222222222222222
7772222222222222
7777777222222222
7777777722222222
7777777777777777
7777777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ skyCovered3, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
7777777777777777
7777777777777777
2227777777777777
2222222227777777
2222222227777777
2222222222777777
2222222227777777
2222222277777777
2222777777777777
7777777777777777
7777777777777777
7777777777777777`],
  [ skyCovered4, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
7722222222777777
7722222222777777
7772222277777722
7777777777777222
7777777722222222
7777777222222222
7777777222222222
7777777772222222
7777777777772222
7777777777777777
7777777777777777
7777777777777777`],

  [ road0, bitmap`L11111111L111111
  L11111111L111111
  1LL11111LLDDDD11
  11LL1111LLLLLDDD
  111LL11LL111LLLD
  1111LLLL111111LL
  11111LL111111111
  LLLLL11111111111
  LLLL221111111111
  L111L22111111111
  L111LL2221111111
  11111LL222111111
  1111111LL2221111
  11111111LL221111
  11111111L1LLL111
  11111111L111LLLL
  ` ],
  [ road1, bitmap`11111111LLL11111
  111111111LL11111
  111111112LLLL111
  111111222L111LLL
  D222222L11111111
  LLLLLLL111111111
  L111111111111111
  L111111111111111
  LL11111111111111
  1L1111111111111L
  11LL1111111111LL
  111LLLLLL11LLL11
  1111111LLLLL2111
  11111111LLLL2211
  11111111L11LL221
  11111111L1111L22
  ` ],
  [ road2, bitmap`11111111L1111111
  11111111L1111111
  1111111LL1111111
  LL111LLLLL222111
  1LLLL1111LLL2221
  11LL1111111LLL22
  11LL1111111111LL
  1LL1L11111111111
  LL11L11111111111
  L111L11111111111
  1111LL1111111111
  11111L1111111111
  11111LL11111111L
  111111L1111111LL
  111111LL1111LL11
  2211111L111LL111
  ` ],
  [ road3, bitmap`11111111LL11111L
  111111111L111111
  111111111L111111
  111111111L111111
  1111111LL1L11111
  2222LLLL111L1111
  LLLLL1111111LL11
  1LL1111111111LLL
  1LLL111111111111
  1L1L111111111111
  1L11L1111111111L
  L111LL111111111L
  L1111L11111111LL
  11111LL111111LL1
  111111L11111LL11
  111111LL1111L111
  ` ],
  [ road4, bitmap`11111111L111111L
  1111111L11111111
  1111111L11111111
  1111111L11111111
  111111LL11111111
  111111L111111111
  111111L111111111
  111111L1111DDDDL
  111111LL11DLLLL1
  1111111LDDLL1111
  1111111LLL111111
  LL11111LL1111111
  LLLLLLLLD1111111
  L1111LLLDDDD1111
  11111111LLDDDD11
  1111111111LDDDD1
  ` ],
  [ road5, bitmap`
LLL11111L11111LL
11LLLL11L1111111
11111LLLL1111111
1111111LLLLLLL11
111111LL11111LL1
111111L11111111L
11111LL111111111
LLLLLL1111111111
1111LL1111111111
11111L1111111111
111111L111111111
1111111LL1111111
11111111LLLLLLLL
1111111111111111
1111111111111111
1111111111112222` ],
  [ road6, bitmap`L211111LLLLL1111
  LLLLLLLLLLDDDDD1
  111111DLLLLLLLDD
  11111DDL111111LL
  1111DDL111111111
  L11DDL2111111111
  LLDDLL2211111111
  1LDDL1L221111111
  1LDL11LL22111111
  1LLL111LL221111L
  11L11111LL2111LL
  11L111111L21LL11
  11L111111LLLL111
  LLL1111111LL1111
  1LL11111111L1111
  2LLLLLL1111L1111
  ` ],
  [ road7, bitmap`1111111L111LL111
  1111111LLLL11111
  DD11111LL1111111
  LDDDD111LL111111
  1LLLDDDDLL111111
  11L1LLLDLLL11111
  1LL111LLL1L11111
  1L11111LL1LL1111
  LL11111L111LL111
  L11111LL1111LL11
  11111LL111111LL1
  11111L11111111LL
  1111LL1111111111
  111LL11111111111
  11LLLLLL1111111L
  LLL11111LL1111LL
  ` ],
  [ road8, bitmap`11111111111LLLDD
  111111111111LLLD
  11111111111LL1LL
  111111111LLL1111
  11111111LL111111
  111DDDLLL1111111
  DDDDLLLL21111111
  LLLLL11L22111111
  11111111L2211111
  11111111LL221111
  111111111L222111
  1111111111L22211
  L111111111LL2221
  L1111111111LLL22
  L111111111111LL2
  LL11111111111LLL
  ` ],
  [ road9, bitmap`1111111111222LLL
  D1111111222LLL11
  DD111222LLL11111
  LD1122LLL1111111
  1LL22LL111111111
  11LLL11111111111
  111LL11111111111
  1111LL1111111111
  11111LL111111111
  111111LL11DDDDDD
  1111111LLDDLLLLL
  1111111LLLL11111
  111111LL1L111111
  1111LLL111L11111
  222LL11111LL1111
  LLLL1111111LLL11
  ` ],
  [ road10, bitmap`LL1111LLL11LL11L
  111111L1LLL1L1LL
  11111LL111LLLLL1
  11111L111111LL22
  11111L1111111LLL
  11111L111111111L
  11111L1111111111
  11111L1111111111
  11111L1111111111
  DDDDLL1111111111
  LLLLL1111111111L
  1111LLL111222LLL
  111111LL222LLL11
  1111111LLLLL1111
  111111111L111111
  111111111LL11111
  ` ],
  [ road11, bitmap`L11111111LL111L1
  1111111111LLLLL1
  11111111111LL111
  211111111111L111
  2211111111111L11
  L211111111111L11
  L221111111111L11
  1L2221111111LLLL
  11LL22222LLL11LL
  11LLLLLLLL1111L1
  LL1111111L1111LL
  111111111L11111L
  111111111L11111L
  111111111L111111
  11111111DL111111
  1111111DDL111111
  ` ],
  [ road12, bitmap`1LL111111LLLLL11
  LLLLLLLLL1111111
  1LLL111111111111
  LL1LL11111111111
  L111LL1111111111
  11111LL111111111
  111111L111111112
  111111LL11111222
  1111111L111122LL
  1111111LL222LLL1
  11111111L2LLL111
  11111111LLL11111
  11111111L1111111
  11111111LL111111
  111111111L111111
  111111111L111111
  ` ],
  [ road13, bitmap`11L1111111111LL1
  11L11111111111LL
  11L111111111111L
  11L1111111111111
  11L1111111111111
  1LLDDDD111111111
  LLLLLDD111111111
  L1111LD111111111
  111111L11111121L
  111111L1111222LL
  111111LL2222LL11
  1111111LLLLL1111
  1111111L11111111
  1111111LL1111111
  11111111L1111111
  11111111LLL11111
  ` ],
  [ road14, bitmap`1111111111LL1111
  11111111111LL111
  L11111111111L111
  LL2211111111LL11
  1LL22122222LLLLL
  11LL222LLLL11111
  1LLLLLLL11111111
  LL11LL1111111111
  L1111L1111111111
  11111LL111111111
  111111L1111111DD
  111111LL1111DDDL
  1111111L111DDLLL
  1111111LLDDDLL11
  11111111LLLL1111
  11111111L1111111
  ` ],
  [ road15, bitmap`1111111DL1111111
  111111DDL11LLLLL
  1111DDDLLLLL1111
  1111DLLLL1111111
  LLLLLL111111111L
  11LLL111111111LL
  1111L11111111LL1
  111LL1111111LL11
  11LL22211111L111
  11LLLL21111LL111
  DLL11LL211LLL111
  L11111L21LL1LL11
  111111L22L111L11
  1111111LLL111LL1
  11111111L11111L1
  11111111L11111LL
  ` ],
  [ bottomMenu0, bitmap`
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLL2LLLLLL
LLLLLLLL22LLLLLL
LLLLLLL222LLLLLL
LLLLLL2222222222
` ],
  [ bottomMenu1, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLL22222L
  LLLLLLLLLL22LLLL
  LLLLLLLLLL22LLLL
  22222LLLLL22LLLL
  ` ],
  [ bottomMenu2, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLL2LLLLLLL
  LLLLLLLLLLL2LLLL
  L2LLL2LL2L22222L
  L22L22LL2LL2LLLL
  ` ],
  [ bottomMenu3, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLL111111LLLLLL
  LLLL111111LLLLLL
  LLLL111111LLLLLL
  LLLL111111LLLLLL
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  ` ],
  [ bottomMenu4, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2222LLLLLLLLLLLL
  2LLL2LLLLLLLLLLL
  2LLL2LLL2222LL22
  2LL22LL22LL2LL2L
  ` ],
  [ bottomMenu5, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLL2LLLLLLLLLLL
  22222222LL2222LL
  LLLL2LLLLLLLL2LL
  ` ],
  [ bottomMenu6, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLL2LLLLLLLLLL
  2L2222222LLLLLLL
  22LLL2LLLLLL2222
  ` ],
  [ bottomMenu7, bitmap`
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLL2LLLLLLLL
  LLLLLLL22LLLLLLL
  LLLLLLL222LLLLLL
  22222222222LLLLL
  ` ],
  [ bottomMenu8, bitmap`
  LLLLLL2222222222
  LLLLLLL222LLLLLL
  LLLLLLLL22LLLLLL
  LLLLLLLLL2LLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu9, bitmap`
  22222LLLLL22222L
  LLLLLLLLLL22LLLL
  LLLLLLLLLL22LLLL
  LLLLLLLLLL22LLLL
  LLLLLLLLLL22222L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu10, bitmap`
  LL2L2LLL2LL2LLLL
  LLL2LLLL2LL2LLLL
  LL2L2LLL2LL2LLLL
  L22L22LL2LL22LLL
  L2LLL2LL2LLL222L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu11, bitmap`
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLL2
  LLLL111111LLLLLL
  LLLL111111LLLLLL
  LLLL111111LLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu12, bitmap`
  2222LLL2LLL22L2L
  2LL2LLL222222LL2
  2LL22LL2LLLLLLLL
  2LLL2LL22LLLLLLL
  2LLL22LL2222LL22
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu13, bitmap`
  LLLL2LLLLLLLL2LL
  22LL2LLLLL2222LL
  L22L2LLLL2LLL2LL
  L22L22LLL2LLL2LL
  22LLL222L22222LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu14, bitmap`
  22LLL2LLLLLL2222
  2LLLL2LLLLLLLLLL
  2LLLL2LLLLLLLLLL
  2LLLL22LLLLLLLLL
  2LLLLL222LLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],
  [ bottomMenu15, bitmap`
  22222222222LLLLL
  LLLLLLL222LLLLLL
  LLLLLLL22LLLLLLL
  LLLLLLL2LLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  1111111111111111
  ` ],

  [ plainGrey, bitmap`
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111`],
  [ plainGreyDark, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL`],
  [ halfGrey, bitmap`
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111`],
  [ greyHalf, bitmap`
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL`],
  [ quarterGrey, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
................
................
................
................
................
................
................
................
................
................
................
................` ],
  [ darkGreyHalf, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
1111111111111111
1111111111111111
1111111111111111
1111111111111111
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL`],
  [ halfDarkGrey, bitmap`
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL`],
  [ cornerTLGrey, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
1111111111111111
1111111111111111
1111111111111111
1111111111111111
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL`],
  [ cornerTRGrey, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
1111111111111111
1111111111111111
1111111111111111
1111111111111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111`],
  [ cornerBLGrey, bitmap`
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
11111111LLLLLLLL
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111`],
  [ cornerBRGrey, bitmap`
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
LLLLLLLL11111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111`],

  [ title0, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLL22LLLLLLL
LLLLLLL22LLLLLLL
LLLLLLL2L2LLL2L2
LLLLLL2LL2LLL22L
LLLLLL2LL22LL22L
LLLLL222222LL2LL
LLLLL2LLLL2LL2LL
LLLLL2LLLLL2L2LL
LLLL22LLLLL2L2LL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
` ],
  [ title1, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2LL2222LL2222LLL
  LL22LLLLLLLL2LL2
  LL2LLLLLLLLL2LL2
  LL2LLLLLL2222LL2
  LL2LLLLL2LLL2LL2
  LL22LLLL2LLL2LL2
  LLL2222L22222LLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ title2, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLL2LLLLLLLLLLL
  LLLL2LLLLLLLLLLL
  LLLL2LLLLLLLLLLL
  222L2LLL2222LLLL
  2LL22LL22LL2LLLL
  LLLL2LL2LLL22LLL
  LLLL2LL222222LLL
  LLLL2LL2LLLLLLLL
  2LL22LL22LLLLLLL
  222L2LLL2222LLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ title3, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L22222LLLLLLLLLL
  L22LLL2LLLLLLLLL
  L22LLL2LL2LLLL2L
  L22LL22LL2LLLL2L
  L22222LLL2LLLL2L
  L22LL2LLL2LLLL2L
  L22LL22LL2LLLL2L
  L22LLL2LL22LL22L
  L22LLL22LL222L2L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ title4, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L2L222LLL2L222LL
  L22LL22LL22LL22L
  L2LLLL2LL2LLLL2L
  L2LLLL2LL2LLLL2L
  L2LLLL2LL2LLLL2L
  L2LLLL2LL2LLLL2L
  L2LLLL2LL2LLLL2L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ title5, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LL2222LL2L22LLLL
  L22LL2LL22LLLLLL
  L2LLL22L22LLLLLL
  L222222L2LLLLLLL
  L2LLLLLL2LLLLLLL
  L22LLLLL2LLLLLLL
  LL2222LL2LLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],

  [ startMenu0, bitmap`
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLL2222LLL
LLLLLLLLL2LLLLLL
LLLLLLLLL2LLLLL2
LLLLLLLLL2222LL2
LLLLLLLLL2LLLLL2
LLLLLLLLL2LLLLL2
LLLLLLLLL2LLLLL2
LLLLLLLLL2222LL2
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
` ],
  [ startMenu1, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLL2LL2LL
  LLLLLLLLLL2LL2LL
  222LLLL22L2LL2LL
  LLL2LL2LL22LL2LL
  LLL2LL2LLL2LL2LL
  LLL2LL2LLL2LL2LL
  LLL2LL2LL22LL2LL
  LLL2LL222L2LL2LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu2, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L222LL2222LL2222
  2LL22L2LLLLL2LLL
  22222L22LLLL22LL
  2LLLLLLL22LLLL22
  2LLLLLLLL2LLLLL2
  L222LL222LLL222L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu3, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLL222LL2LLL2LL
  LLLL22LLL2LLL2LL
  LLLL2LLLL2LLL2LL
  LLLL2LLLL2LLL2LL
  LLLL2LLLL2LLL2LL
  LLLL2LLLL22222LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu4, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2222LLL2222LLLL2
  2LLL2LL2LLL2LL2L
  2LLL2LL2LLL2LL22
  2LLL2LL2LLL2LL2L
  2LLL2LL2LLL2LL2L
  2LLL2LL2LLL2LLL2
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu5, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  22LL222LLLLL2222
  L22L22LLLLLL2LL2
  222L2LLLLLLL2LL2
  LLLL2LLLLLLL222L
  LLLL2LLLLLLL2LLL
  22LL2LLLLLLL2222
  LLLLLLLLLLL2LLLL
  LLLLLLLLLLL2LLLL
  LLLLLLLLLLLL2222
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu6, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2L2222LL2222L222
  LLLLL2LL2LLL2LL2
  LL2222LL2LLL2LL2
  LL2LL2LL2LLL2LL2
  LL2LL2LL2LLL2LL2
  LL2222LL2LLL2LL2
  2LLLLLLLLLLLLLLL
  2LLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu7, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLL222LLLLLLLLL
  LLL2LL22LLLLLLLL
  LLL22222LLLLLLLL
  LLL2LLLLLLLLLLLL
  LLL2LLLLLLLLLLLL
  LLLL222LLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu8, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLL222
  LLLLLLLLLLLL22LL
  LLLLLLLLLLLL2LLL
  LLLLLLLLLLLL2LLL
  LLLLLLLLLLLL2LLL
  LLLLLLLLLLLL2LLL
  LLLLLLLLLLLL22LL
  LLLLLLLLLLLLL222
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLL8888LLLL8888
  ` ],
  [ startMenu9, bitmap`
  LLLLLLLLLLLLLLLL
  22LLLLLLLL2LL2LL
  LLLLLLLLLL2LL2LL
  LLLL222LLL2LL2LL
  LLL2LLL2LL2LL2LL
  LLL2LLL2LL2LL2LL
  LLL2LLL2LL2LL2LL
  LLL2LLL2LL2LL2LL
  2LLL222LLL2LL2LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLL888
  ` ],
  [ startMenu10, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLL2LLLL
  L222LLL2222222LL
  2LL22L2LLLL2LLLL
  22222L2LLLL2LLLL
  2LLLLL2LLLL2LLLL
  2LLLLL2LLLL2LLLL
  L222LLL222L222LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  8LLLL8888LLLLLLL
  ` ],
  [ startMenu11, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLL2LLLLLLLL
  LLL2LLL2LLLLLLLL
  LL2222L2222LLLL2
  LLL2LLL2LLL2LL2L
  LLL2LLL2LLL2LL2L
  LLL2LLL2LLL2LL2L
  LLL2LLL2LLL2LL2L
  LLL222L2LLL2LLL2
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu12, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  22LLL2222LL222LL
  LL2LL2LLLL2LL22L
  LL2LL22LLL22222L
  LL2LLLL22L2LLLLL
  LL2LLLLL2L2LLLLL
  22LLL222LLL222LL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu13, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLL2LLLLLLL
  LLL2LLLLLLLLLLLL
  LL2222LL2LLL222L
  LLL2LLLL2LL2LLLL
  LLL2LLLL2LL2LLLL
  LLL2LLLL2LL2LLLL
  LLL2LLLL2LL2LLLL
  LLL222LL2LLL222L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu14, bitmap`
  LLLLLLLLLLLLLLLL
  2LLLLLLLLLLLLLLL
  2LLLLLLLLLLLL2LL
  2LL2LLL222LL2222
  2L2LLL2LL22LL2LL
  222LLL22222LL2LL
  2L2LLL2LLLLLL2LL
  2LL2LL2LLLLLL2LL
  2LL22LL222LLL222
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu15, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L2222LLLLLLLLLLL
  L2LLLLLLLLLLLLLL
  L22LLLLLLLLLLLLL
  LLL22LLLLLLLLLLL
  LLLL2LLLLLLLLLLL
  L222LLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu16, bitmap`
  LLL8888833333333
  LLL8883332233333
  LLL8833323233333
  LLL8333233233333
  LLL3333333233333
  LLL3333333233333
  LLL333333323333C
  LLL33333333333CC
  LLLLCCCC8833CCCC
  LLLLL88833322333
  LLLLL88333232333
  LLLLL83332332333
  LLLLL33333332333
  LLLLL33333332333
  LLLLL33333332333
  LLLLL33333333333
  ` ],
  [ startMenu17, bitmap`
  3LLLLLLLLLLL8888
  3LLLLLLLLLLL8883
  3LLLLLLLLLLL8833
  38888LLLL8888333
  3888833333333333
  3883332233333333
  C833323233333333
  C333233233383333
  3333333233888CCC
  3333333233888333
  3333333233883332
  3333333333833323
  3CCCCLLLLC333333
  333LLLLLLL333333
  3CCLLLLLLL333333
  CCCLLLLLLL333333
  ` ],
  [ startMenu18, bitmap`
  8333333333LLLLLL
  3322333333L8888L
  3232333333888883
  2332333333888333
  3332333333883332
  3332333333833323
  33323333CC333333
  3333333888333333
  C3333C8888333333
  2233338883333333
  32333388333CCCC3
  3233338333233233
  3233333333333233
  3233333333333233
  3233333333333233
  33333C3333333333
  ` ],
  [ startMenu19, bitmap`
  LLLLLLLLLLLLLLLL
  LLL8888LLLLLLLLL
  33333333L8888LLL
  2233333388888333
  3233333388833322
  3233333388333232
  3233333383332332
  3233333333333332
  323333CC33333332
  338888CC33333332
  3888883333333333
  388833322CCCC33L
  388333232333333L
  383332332333333L
  333333332333333L
  333333332333333L
  ` ],
  [ startMenu20, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L8888LLLLLLLLL88
  333333LLLLLLL888
  333333LLLLLLL888
  333333LLLLLLL883
  333333LLLLLLL833
  333333888LLLL333
  3333338883333333
  3333CC8333223333
  333CCC3332323333
  LCCCC333233233CC
  LLLL333333323333
  LLLL333333323333
  LLLL333333323333
  LLLL33333333333C
  ` ],
  [ startMenu21, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLL8888LL
  88LLLL8888888833
  8833333338883332
  3332233338833323
  3323233338333233
  3233233333333333
  3333233333333333
  3333233333333333
  3388883333888833
  3888883333333338
  C888333223333338
  3883332323333338
  3833323323333333
  C333333323333333
  C333333323333333
  ` ],
  [ startMenu22, bitmap`
  LLLLLLLLLLLLLLLL
  LL8888LLLLLLLLLL
  3333333L8888LLLL
  2333333888883333
  2333333888333223
  2333333883332323
  2333333833323323
  2333333333333323
  23333CC333333323
  3333CCC888833323
  88CCCC3333333333
  833322333333L883
  333232333333L833
  332332333333L333
  333332333333L333
  333332333333L333
  ` ],
  [ startMenu23, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  8888LLLLLLLLLLLL
  33333LLLLLLLLLLL
  33333LLLLLLLLLLL
  33333LLLLLLLLLLL
  33333LLLLLLLLLLL
  33333LLLLLLLLLLL
  33333L8888LLLLLL
  333CC333333LLLLL
  33CCC333333LLLLL
  CCCC2333333LLLLL
  32332333333LLLLL
  33332333333LLLLL
  33332333333LLLLL
  333323333CCLLLLL
  ` ],
  [ startMenu24, bitmap`
  LLLLLLCCCCLLLLCC
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu25, bitmap`
  CCLLLLLLLLLCCCCL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLL22222L
  LLLLLLLLLL2LLL2L
  LLLLLLLLLL2LLL2L
  LLLLLLLLLL2222LL
  LLLLLLLLLL2LLL2L
  LLLLLLLLLL2LLL22
  LLLLLLLLLL2LLL2L
  LLLLLLLLLL22222L
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu26, bitmap`
  LLLCCCCCCCCLLLLC
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLL2L
  2LLL22L2LLLLLL2L
  L2LL2LLLLLLLLL2L
  L2LL2LLLLLLLL22L
  L2L2LLLLLLLLL222
  LL22LLL2LLLLL2LL
  LL22LLL2LLLL2LLL
  LL2LLLLLLLLLLLLL
  ` ],
  [ startMenu27, bitmap`
  C333333323333CCL
  L33333333333CCCL
  LLCCCCLLLLCCCCLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2LLLLLLLL2LLLLLL
  2LLL222L2222LL22
  2LLL22LLL2LLL2LL
  L2LL2LLLL2LLL222
  22LL2LLLL2LLL2LL
  L22L2LLLL2LLL2LL
  LL2L2LLLL222LL22
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu28, bitmap`
  LLLLLCCCCLLLLCCC
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2LLL2222L222LLL2
  22LL2LLL2LL2LL2L
  22LL2LLL2LL2LL2L
  LLLL2LLL2LL2L222
  LLLL2LLL2LL2LLLL
  2LLL2LLL2LL2LLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu29, bitmap`
  C333333323333CC3
  L33333333333CCC3
  LLCCCCLLLLCCCCLC
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  L2LLL2222LL2222L
  22LLL2LL2LL2LLLL
  L2LLL2LL2LL2LLLL
  L2LLLL222LL2222L
  L2LLL22L2LLLLL22
  222LL2LLL2LLLLL2
  L2LLL2LLL2LLLL2L
  L2LLL2222LL2222L
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu30, bitmap`
  3333323333CCL333
  333333333CCCLLCC
  CCCLLLLCCCCLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LL2222LLLLLLLLLL
  LLLLL2LLLLLLLLLL
  LLLLL2LLLLLLLLLL
  LLLLL2LLLLLLLLLL
  LLLL2LLLLLLLLLLL
  LLL2LLLLLLLLLLLL
  LL2LLLLLLLLLLLLL
  LL22222LLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu31, bitmap`
  33333333CCCLLLLL
  CCLLLLCCCCLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu32, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu33, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LL2222LLLLLLLLLL
  LL2LLL2LLLLLLLLL
  LL2LLL2LL222LLL2
  LL2LLL2LL22LLL2L
  LL2222LLL2LLLL22
  LL2LLLLLL2LLLL2L
  LL2LLLLLL2LLLL2L
  LL2LLLLLL2LLLLL2
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu34, bitmap`
  LL2LLLLLLLLLLLLL
  22LLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  22LL2222LL2222LL
  L22L2LLLLL2LLLLL
  222L22LLLL22LLLL
  LLLLLL22LLLL22LL
  LLLLLLL2LLLLL2LL
  22LL222LLL222LLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu35, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLLL2
  LLLL222222222222
  LLLL222222222222
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLLL2
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu36, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLL2LLL
  2LLLLLLLLLL2222L
  22LLLLLLLLLL2LLL
  222LLLLLLLLL2LLL
  222LLLLLLLLL2LLL
  22LLLLLLLLLL2LLL
  2LLLLLLLLLLL222L
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu37, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLL2
  L222LLLLLL222222
  2LLL2LLLLL2LLLL2
  2LLL2LLLLL22LLL2
  2LLL2LLLLLLL22L2
  2LLL2LLLLLLLL2L2
  L222LLLLLL222LL2
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu38, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLL2L
  22L2222LLL222222
  LLLLLL2LLL22LL2L
  LLL2222LLL2LLL2L
  LLL2LL2LLL2LLL2L
  LLL2LL2LLL2LLL2L
  22L2222LLL2LLL22
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ],
  [ startMenu39, bitmap`
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2LLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  2LLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  LLLLLLLLLLLLLLLL
  ` ]
)

setSolids([])

let startMap = map`
>>EFHIJK>>
<<<<<<<<<<
<LMNOPRUV<
<WXYZruvw<
<xyz09÷,±<
<:;=℆{}©®<
<℗™℠№ªº℔℥<
<<<<<<<<<<`;

let main = map`
>>>>>>>>>>
~|?_~|?_~|
SsSsCcSsCc
oqmnoqmnoq
DdaADdaADd
ghefghefgh
klijklijkl
oqmnoqmnoq`;

let menu = map`
>>>>>>>>>>
5333333336
2>>>>>>>>1
2>>>>>>>>1
2>>>>>>>>1
2>>>>>>>>1
<!@#$%^&*<
<()-+[]'/<`;

function startMenu() {
  setMap(startMap);
  clearText();
}
  
function resetGame() {
  setMap(main);
  clearText();
  addSprite(0, 0, "T");
  addSprite(9, 0, "G");
  addSprite(0, 4, "p");
  banned = false;
  startTime = performance.now();
  lastSpawn = startTime - 1000;
  lastMove = startTime - 1000;
  malfunction = 0;
  score = 0;
  speed = 1;
}

let banned;
let startTime;
let lastSpawn;
let lastMove;
let malfunction;
let score;
let start;
let speed;

onInput("w", () => {
  if (banned || malfunction > 5 || start) return
  if (getFirst(player).y != 3 && Math.random() > malfunction * 0.2) {
    getFirst(player).y -= 1
  }
});

onInput("s", () => {
  if (banned || malfunction > 5 || start) return
  if (Math.random() > malfunction * 0.2) {
    getFirst(player).y += 1
  }
});

onInput("a", () => {
  if (!banned && malfunction < 5) return
  start = true;
  startMenu();
});
    
onInput("d", () => {
  if (!banned && malfunction < 5 && !start) return
  resetGame();
  start = false;
  gameLoop();
});

function gameLoop() {
  if (!start && !banned && malfunction < 5 && performance.now()-startTime <= 1000000) {
    // Spawning new tickets
    if (performance.now()-lastSpawn >= Math.max(800/speed, 300)) {
      const x = 9;
      const y = Math.floor(Math.random()*5)+3;
      const rand = Math.random();
      if (rand > 0.5) {
        addSprite(x, y, "t");
      } else if (rand > 0.1) {
        addSprite(x, y, "B");
      } else {
        addSprite(x, y, "b");
      }
      lastSpawn = performance.now();
    }

    // Moving everything
    if (performance.now()-lastMove >= Math.max(700/speed, 300)) {
      speed += 0.005;
      const tickets = getAll("t");
      const bans = getAll("b");
      const bugs = getAll("B");
      const sprites = [...tickets, ...bans, ...bugs];
      const toRemove = [];
      sprites.forEach(sprite => {
        if (sprite.x == 0) {
          toRemove.push(sprite);
        } else {
        sprite.x -= 1; 
        }
      });
      toRemove.forEach(sprite => {
        sprite.remove();
      });
      lastMove = performance.now();
    }

    // Player collecting 'em
    const tickets = getAll("t");
    const bans = getAll("b");
    const bugs = getAll("B");
    const sprites = [...tickets, ...bans, ...bugs];
    const toRemove = [];
    sprites.forEach(sprite => {
      if (getTile(sprite.x, sprite.y).some(spriteC => spriteC.type === "p")) {
        if (sprite.type === "t") {
          playTune(collectedTicket);
          score++;
        } else if (sprite.type === "B") {
          playTune(collectedBug);
          malfunction++;
        } else if (sprite.type === "b") {
          banned = true;
        }
        toRemove.push(sprite);
      }
    });
    toRemove.forEach(sprite => {
      sprite.remove();
    });

    // Updating score and bugs
    addText(`  ${score}`, {
      x: 1,
      y: 1, 
      color: color`2`
    });

    addText(`${malfunction}`, {
      x: 16,
      y: 1, 
      color: color`2`
    });

    setTimeout(gameLoop, 1000/60)
  }
  else if (!start) {
    clearText()
    playTune(lost);
    addText(`  ${score}`, {
      x: 1,
      y: 1, 
      color: color`2`
    });

    addText(`${malfunction}`, {
      x: 16,
      y: 1, 
      color: color`2`
    });
    if (banned) {
      text = `Womp womp. You \nwere banned and \nlost all your \n${score} tickets. \nBetter luck \nnext time.`
    } else if (malfunction >= 5) {
      text = `Oh no, you \ncollected too \nmany bugs and \nnow all your ${score} \ntickets flew \naway. Better \nluck next time.`
    }
    setMap(menu);
    addSprite(0, 0, "T")
    addSprite(9, 0, "G")
    addText(text, {
      x: 2,
      y: 4, 
      color: color`2`
    });
  }
}

startMenu();
